<template>
 <div>
     <el-form :model="putId"  ref="putId" label-width="100px" >

        <el-form-item label="姓名:" prop="tel">
            <div>{{putId.name}}</div>
        </el-form-item>

        <el-form-item label="职务:" prop="level">
            <el-input v-model="putId.level"></el-input>
        </el-form-item>


        <el-form-item>
            <el-button type="primary" @click="submitForm(putId.id,putId.level)">确定</el-button>
            <el-button @click="aout">取消</el-button>
        </el-form-item>
        </el-form>
  </div>   
</template>


<script>
import { putlists } from "../../api/api";
export default {
  data() {
    return {
     
    };
  },
  created() {
   
  },
  watch: {
    putId(putId) {
    
    }
  },
  props: ["putId"],
  methods: {
    submitForm(putId,level) {
        putlists(putId,level).then(res =>{
           
            this.$emit('dialogVisible')
        }).catch(err => {
            alert('修改失败')
        })
    },
    aout(){
      this.$emit('dialogVisible')  
    }
  }
};
</script>


<style lang="scss" scoped>
.el-input{
  width: 200px;
}
</style>


